﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Commonlib;
namespace AlbonWeb.Manager.OrderManager
{
    public partial class AddCloth : System.Web.UI.Page
    {
        private readonly BLL.OrderBLL orderbll = new BLL.OrderBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request["orderidlist"] != null)
                {
                    bindRep();
                }
            }
        }
        //绑定需要购买的布料信息
        protected void bindRep()
        {
            string cmdstr = "select * from ItemClothView where active=1 and finished=1 and  orderID in ("+Request["orderidlist"].ToString()+")";
            SqlHelper.BindRepeater(repMain, SqlHelper.SqlConnectionString, CommandType.Text, cmdstr, null);
        }
        //汇总布料
        protected void totalCloth_Click(object sender, EventArgs e)
        {
            BLL.ClothBuyBLL clothbuybll = new BLL.ClothBuyBLL();
            clothbuybll.totalCloth(hfchecklist.Value);
            Response.Redirect("/Manager/OrderManager/SendEmail.aspx");
        }
    }
}